home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
Ubuntu 9.10 PL
/
karmelkowy-koliberek-desktop-9.10-i386-PL.iso
/
casper
/
filesystem.squashfs
/
usr
/
bin
/
dh_installdefoma
< prev
next >
Wrap
Text File
|
2006-06-17
|
2KB
|
62 lines
#!/usr/bin/perl -w
#
# Registration with defoma.
use Debian::Debhelper::Dh_Lib;
init();
use FileHandle;
my $fh = new FileHandle("debian/control", "r");
my @l = $fh->getlines();
$fh->close();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
$TMP=tmpdir($PACKAGE);
my $defoma = pkgfile($PACKAGE, "defoma");
my $udefoma = pkgfile($PACKAGE, "udefoma");
my $hints = pkgfile($PACKAGE, "defoma-hints");
if ( $defoma ne '' ) {
if ( ! -d "$TMP/usr/share/defoma/scripts/") {
doit("install","-d","$TMP/usr/share/defoma/scripts/");
}
doit("install","-m0644","$defoma","$TMP/usr/share/defoma/scripts/$PACKAGE.defoma");
}
if ( $udefoma ne '' ) {
if ( ! -d "$TMP/usr/share/defoma/scripts/") {
doit("install","-d","$TMP/usr/share/defoma/scripts/");
}
doit("install","-m0644","$udefoma","$TMP/usr/share/defoma/scripts/$PACKAGE.udefoma");
}
if ( $hints ne '' ) {
if ( ! -d "$TMP/etc/defoma/hints/") {
doit("install","-d","$TMP/etc/defoma/hints/");
}
doit("install","-m0644","$hints","$TMP/etc/defoma/hints/$PACKAGE.hints");
}
if ($defoma) {
if (! $dh{NOSCRIPTS}) {
autoscript($PACKAGE,"postinst","postinst-defoma",
"s/#PACKAGE#/$PACKAGE/;");
autoscript($PACKAGE,"prerm","prerm-defoma",
"s/#PACKAGE#/$PACKAGE/;");
autoscript($PACKAGE,"postrm","postrm-defoma",
"s/#PACKAGE#/$PACKAGE/;");
}
}
if ($hints) {
if (! $dh{NOSCRIPTS}) {
autoscript($PACKAGE,"postinst","postinst-defoma-hints",
"s/#PACKAGE#/$PACKAGE/;");
autoscript($PACKAGE,"prerm","prerm-defoma-hints",
"s/#PACKAGE#/$PACKAGE/;");
}
}
}